{% extends "base.html" %}
{% comment 'header' %}
# This file is part of opentaps Smart Energy Applications Suite (SEAS).

# opentaps Smart Energy Applications Suite (SEAS) is free software:
# you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# opentaps Smart Energy Applications Suite (SEAS) is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public License
# along with opentaps Smart Energy Applications Suite (SEAS).
# If not, see <https://www.gnu.org/licenses/>.
{% endcomment %}

{% load static %}

{% block title %} {{ object.meter.description }} {{ object.model_class }}{% endblock %}

{% block content %}
<div class="container">

  {% include "core/_breadcrumbs.html" %}

  <div class="card mb-3">
    <div class="card-body">
      <h2 class="d-flex">
        {{ object.description|default:"" }}
        {% block add_button %}
        <div class="ml-auto text-nowrap">
          <a href="{% url 'core:meter_rate_plan_history' object.meter_id %}" role="button" class="btn btn-primary"><i class="fa fa-angle-left mr-2"></i> Back</a>
        </div>
        {% endblock add_button %}
      </h2>
      {% block inner_content %}

      <p><b>Parameters:</b>
        {% if object and object.params %}
            <pre>{{ object.params | pprint }}</pre>
        {% endif %}
        {% if object and object.rate_details %}
            <pre>{{ object.rate_details | pprint }}</pre>
        {% endif %}
      </p>

      {% endblock inner_content %}
    </div>
  </div>

</div>
{% endblock content %}
